package com.traffic.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.traffic.entity.Collect;


import com.traffic.mapper.CollectionMapper;
import com.traffic.service.CollectionService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CollectionSerivceImpl extends ServiceImpl<CollectionMapper, Collect> implements CollectionService{

    @Autowired
    CollectionMapper collectionMapper;

    @Override
    public List<Collect> queryAllCollections(Integer user_id) {
        QueryWrapper<Collect> wrapper = new QueryWrapper<>();
        wrapper.eq("user_id",user_id);
        List<Collect> collections=collectionMapper.selectList(wrapper);

        return collections;
    }
}
